/* 
 * File:   helper.h
 * Author: karthik
 *
 * Created on November 28, 2011, 11:28 AM
 */

#ifndef _HELPER_H
#define	_HELPER_H\



inline std::string strTrim(std::string& str);

void readConfigFile(const char* fp);

double** readDataFile(const char* fp, int p, int d);

double** readquerypointFile(const char* fp, int p, int d);

double** readqueryKnnFile( char* fp, int p, int d);

struct qr readqueryrangeFile(const char* fp, int p, int d);

char* fileNamePrefix(char* fileName);

int* getFileInfo(const char* fp);

double startTimer();
double stopTimer();
double timeElapsed(double start, double stop);
void sleepForHowLong(int sleepTime);


struct qr{
    double *min;
    double *max;
};

/*
const char* trim(char* str);
const char* ltrim(char* str);
const char* rtrim(char* str);
*/

void testMemoryData(int n, int d);



#endif	/* _HELPER_H */

